package com.liws.helloeasyexcel.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: liweisheng
 * @Dcscription:
 * @Date: 2021/12/8 15:43
 */

/*
@ColumnWidth(value = 50) // 列宽
*/
@HeadRowHeight(value = 35) // 表头行高
@ContentRowHeight(value = 25) // 内容行高
@Data
public class Student implements Serializable {
    //@ExcelIgnore： 忽略列
    @ExcelProperty(value = {"学生信息","学生编号"},order = 2)
    private Integer id;
    @ExcelProperty(value = {"学生信息","学生姓名"},order = 1)
    private String name;
    @ExcelProperty(value = {"学生信息","学生薪水"},order = 3)
    private Double salary;
    @ExcelProperty(value = {"学生信息","学生生日"},order = 4)
    @DateTimeFormat("yyyy-MM-dd")
    private Date birthday;
}
